package com.cavy.platform.server.domain.job;

import com.cavy.platform.server.domain.message.Message;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 唐旭
 * @Date 2018/7/26
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class JobStopMessage extends Message {
    protected String number;
    protected String pipelineName;
    protected String projectName;
    protected String workspaceName;

    public JobStopMessage(JobId job) {
        number = job.getNumber();
        pipelineName = job.getPipelineName();
        projectName = job.getProjectName();
        workspaceName = job.getWorkspaceName();
        this.type = JobStopMessage.class.getSimpleName();
    }
}
